<template>
    <view class="shop-list pannel_stb" :style="'margin-top: ' + (isFixedTop ? 30 : 0) + 'rpx;'">
        <block v-for="(item, index) in goodsList" :key="index">
            <view class="shop-one">
                <view class="hd_label" v-if="item.IsImportant">
                    <image src="/static/img/hdsj.png" style="height: 100%" mode="heightFix"></image>
                </view>
                <view class="name_icon" v-if="item.renzheng">
                    <image src="/static/img/jinpai.png" style="margin-right: 4rpx; height: 100%" mode="heightFix"></image>
                </view>
                <view class="flex-row" @tap="gocompanydetail" :data-id="item.ShopId" :data-distance="item.distance">
                    <view class="flex-grow-0 flex-y-center vipbg">
                        <image
                            :src="$com.imageOSS(item.picurl) + '?x-oss-process=image/resize,m_fill,h_200,w_200'"
                            :style="'width:200rpx;height:200rpx;border-radius:' + (item.VIP > 0 || item.discount > 0 ? 36 : 10) + 'rpx;'"
                        ></image>
                        <image src="/static/img/vip-bg.png" style="position: absolute; z-index: 1; width: 200rpx; height: 200rpx" v-if="item.VIP > 0"></image>
                        <image src="/static/img/vip-bg_dis.png" style="position: absolute; z-index: 1; width: 200rpx; height: 200rpx" v-if="item.discount > 0"></image>
                    </view>
                    <view class="w-100 flex-grow-1 content_shop" style="margin: 0 20rpx">
                        <view class="flex-row shop_name">
                            <view class="flex-grow-0" style="margin-right: 12rpx" v-if="item.VIP > 0">
                                <image src="/static/img/svip.png" style="margin-right: 4rpx; height: 100%" mode="heightFix"></image>
                            </view>
                            <view class="text-more shop_name" :style="'color:#353535; width: ' + (item.IsImportant ? '65%' : '80%') + ';'">{{ item.ShopName }}</view>
                        </view>
						<view v-if="item.shouquan" class="shouquan_tag">
							<image :src='$com.imageOSS("xuqiu/m17413377050005441.png")' style='height:100%;width: 100%;' mode="widthFix"></image>
						</view>
                        <view class="shop_address_jl list-mt-10">
                            <view class="shop_address ellipsis">
                                <van-icon name="location" size="14px" />
                                {{ item.Address2 + (item.Address != 'null' ? item.Address : '') }}
                            </view>
                            <view class="shop_juli ellipsis">距离：{{ $com.toFixKM(item.distance) || '' }}</view>
                        </view>
                        <view class="fs-sm flex-row list-mt-10 label_box">
                            <view class="name_label label_rx" style="background-color: #fdf3e4; color: #b89d76" v-if="item.rexiaobang">
                                <view class="label_rx_top">TOP</view>
                                {{ item.city }}热销前{{ item.rexiaobang == 1 ? '10' : '100' }}名
                            </view>
                            <view class="name_label" style="background-color: #edf4fe; color: #4d84d0" v-if="item.zhiming">全国知名品牌</view>
                            <view class="name_label" style="background-color: #fdf2e4; color: #e37929" v-if="item.renzheng">
                                <text>平台认证</text>
                            </view>
                            <view v-if="item.Category && item.Category != 'null'" class="label_lei">
                                {{ item.Category != null && item.Category != 'null' ? item.Category + '类' : '' }}
                            </view>
                        </view>
                        <view class="fs-sm flex-row list-mt-10 label_box">
                            <view class="coupon_b">
                                <view class="cou_big ellipsis">
                                    <text style="font-size: 28rpx">￥</text>
                                    {{ item.coupon.minusprice }}
                                </view>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </block>
    </view>
</template>
<script>
export default {
    data() {
        return {
            isShow: false,
            data: '',
            loadmore: '',
            loaddone: '',
            abnor: ''
        };
    },
    /**
     * 组件的属性列表
     */
    props: {
        goodsList: {
            type: Array,
            default: () => []
            // observer:"getBoxSize"
        },
        isFixedTop: {
            type: Boolean,
            default: false
        }
    },
    /**
     * 组件的方法列表
     */
    methods: {
        gocompanydetail(e) {
            const data = e.currentTarget.dataset || e.target.dataset;
            this.$emit('gocompanydetail', {
                detail: {
                    data
                }
            });
        }
    },
    created: function () {}
};
</script>
<style>
	@import './my-cougoods-list.css';
</style>
